let t = require;
let  e = module
let  o =  e.exports;
 o.default =  e.exports;

                'use strict';
                console.log("start");
                var _n76,
                    i =
                    (this && this.__extends) ||
                    ((_n76 = function n(t, e) {
                            return (_n76 =
                                Object.setPrototypeOf ||
                                ({
                                        __proto__: []
                                    }
                                    instanceof Array &&
                                    function(t, e) {
                                        t.__proto__ = e;
                                    }) ||
                                function(t, e) {
                                    for (var o in e) {
                                        Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
                                    }
                                })(t, e);
                        }),
                        function(t, e) {
                            function o() {
                                this.constructor = t;
                            }
                            _n76(t, e),
                                (t.prototype =
                                    null === e ?
                                    Object.create(e) :
                                    ((o.prototype = e.prototype), new o()));
                        }),
                    r =
                    (this && this.__decorate) ||
                    function(t, e, o, n) {
                        var i,
                            r = arguments.length,
                            a =
                            r < 3 ?
                            e :
                            null === n ?
                            (n = Object.getOwnPropertyDescriptor(e, o)) :
                            n;
                        if (
                            'object' ==
                            (typeof Reflect === 'undefined' ?
                                'undefined' :
                                typeof(Reflect)) &&
                            'function' == typeof Reflect.decorate
                        )
                            a = Reflect.decorate(t, e, o, n);
                        else
                            for (var s = t.length - 1; s >= 0; s--) {
                                (i = t[s]) &&
                                (a = (r < 3 ? i(a) : r > 3 ? i(e, o, a) : i(e, o)) || a);
                            }
                        return r > 3 && a && Object.defineProperty(e, o, a), a;
                    };
                Object.defineProperty(o, '__esModule', {
                        value: !0
                    }),
                    (o.CivilizationPanel = void 0);
                var a = t('CivilizationMrg'),
                    s = t('AbsInfo'),
                    c = t('ComUtils'),
                    l = t('ScienceItemCom'),
                    u = t('CivilizationCfg'),
                    h = t('GeneralTips'),
                    p = t('UIViewRes'),
                    f = t('UILayer'),
                    d = t('AbsMainPanel'),
                    g = t('LangCfg'),
                    _ = cc._decorator,
                    y = _.ccclass,
                    C =
                    (_.property,
                        (function(t) {
                            function e() {
                                return (null !== t && t.apply(this, arguments)) || this;
                            }
                            return (
                                i(e, t),
                                (e.prototype.onInit = function() {
                                    t.prototype.onInit.call(this);
                                    var e = c.default.getNode(this.view, 'science/ScienceItem'),
                                        o = c.default.getComponent(
                                            cc.ScrollView,
                                            this.view,
                                            'science/scrollView'
                                        );
                                    (e.parent = null),
                                    (this._txtName = c.default.getComponent(
                                        cc.Label,
                                        this.view,
                                        'dibantu/wenmingdiban/txtName'
                                    )),
                                    (this._progress = c.default.getComponent(
                                        cc.ProgressBar,
                                        this.view,
                                        'dibantu/progress'
                                    )),
                                    (this._txtScienceLeve = c.default.getComponent(
                                        cc.RichText,
                                        this.view,
                                        'dibantu/txtScienceLeve'
                                    ));
                                    for (
                                        var n = 0; n < a.CivilizationMrg.ins.sciences.length; n++
                                    ) {
                                        var i = a.CivilizationMrg.ins.sciences[n];
                                        if (a.CivilizationMrg.ins.getOpenScienceByType(i.type)) {
                                            var r = new l.ScienceItemCom(cc.instantiate(e), i);
                                            (r.view.active = !0),
                                            o.content.addChild(r.view),
                                                this.addCom(r);
                                        }
                                    }
                                    a.CivilizationMrg.ins.on(
                                            s.InfoEvent.LevelChanged,
                                            this.onLevelChangedHandler,
                                            this
                                        ),
                                        a.CivilizationMrg.ins.on(
                                            s.InfoEvent.StateChanged,
                                            this.onStateChangedHandler,
                                            this
                                        ),
                                        this.refresh();
                                }),
                                (e.prototype.onLang = function() {
                                    this.refresh();
                                }),
                                (e.prototype.onStateChangedHandler = function(t) {
                                    cc.tween(this._progress)
                                        .to(0.1, {
                                            progress: t
                                        })
                                        .start();
                                }),
                                (e.prototype.onLevelChangedHandler = function() {
                                    for (var t in (h.GeneralTips.show(
                                                g.LangCfg.ins.getContent(1017, {
                                                    n: g.LangCfg.ins.getContent(
                                                        a.CivilizationMrg.ins.data.name
                                                    )
                                                })
                                            ),
                                            this.coms)) {
                                        var e = this.coms[t];
                                        e && e.refresh();
                                    }
                                    this.refresh();
                                }),
                                (e.prototype.refresh = function() {
                                    var t = u.CivilizationCfg.ins.getData(
                                        a.CivilizationMrg.ins.id + 1
                                    );
                                    (this._txtName.string = g.LangCfg.ins.getContent(
                                        a.CivilizationMrg.ins.data.name
                                    )),
                                    (this._progress.progress = a.CivilizationMrg.ins.progress),
                                    (this._txtScienceLeve.string = t ?
                                        g.LangCfg.ins.getContent(200400, {
                                            n: a.CivilizationMrg.ins.data.scienceLevels[0],
                                            m: g.LangCfg.ins.getContent(t.name)
                                        }) :
                                        '');
                                }),
                                (e.RES = new p.UIViewRes(
                                    'Panel/CivilizationPanelView',
                                    'Main',
                                    f.UILayer.BackLayer
                                )),
                                r([y('CivilizationPanel')], e)
                            );
                        })(d.AbsMainPanel));
                (o.CivilizationPanel = C), console.log("end");
            module.exports =  e.exports;